
program SortLeast;

{$APPTYPE CONSOLE}
var
mass : array of integer;
i,j : integer;
n : integer;
k, min : integer;
fin, fout :  textfile;

begin
  assignfile(fin, 'input.txt');
  reset(fin);
  readln(fin, n);
  setlength(mass, n);
  for i:=0 to n-1 do
    read(fin, mass[i]);
  closefile(fin);
  for i:=0 to n-2 do
  begin
    min :=mass[i];
    for j:=i+1 to n-1 do
    begin
      if mass[j] < min then
      begin
        min := mass[j];
        k :=j;
      end;
      mass[i] := mass[k]+mass[i];
      mass[k] := mass[i]-mass[k];
      mass[i] := mass[i]-mass[k];
    end;
  end;
  assignfile(fout, 'output.txt');
  rewrite(fout);
  for i:=0 to n-1 do
    write(fout, mass[i],' ');
  closefile(fout);
end.
 